<template>
  <UseDark v-slot="{ isDark, switchMode }">
    <div class="box-container">
      <div
        :class="[
          'wrapper',
          {
            center: center
          }
        ]"
      >
        <slot :isDark="isDark" :switchMode="switchMode"></slot>
        <Footer class="footer" />
      </div>
    </div>
  </UseDark>
</template>

<script lang="ts" setup>
import UseDark from '@/components/theme/UseDark.vue'
import Footer from '@/components/home/Footer.vue'
defineProps({
  center: {
    type: Boolean,
    default: false
  }
})
</script>

<style lang="scss">
.box-container {
  user-select: none;
  padding: 9px;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  .wrapper {
    height: 0;
    flex: 1;
  }
  .center {
    display: grid;
    place-content: center;
  }
}
</style>
